package cn.com.qqgame.assistant;

import java.io.File;

import com.google.common.base.Strings;

public abstract class AbstractAssistant implements Assistant {
	private final String game;

	public AbstractAssistant(final String game) {
		this.game = game;
		if(Strings.nullToEmpty(this.game).isEmpty()) {
			throw new IllegalArgumentException("Parameter game is required.");
		}
	}

	public String getGlobalResourcesDir() {
		return new File("resources").getAbsolutePath();
	}

	public String getResourcesDir() {
		return getGlobalResourcesDir() + File.separator + game;
	}
	
	public String getPressedDir() {
		return getResourcesDir() + File.separator + "pressed";
	}
	
	public String getActionsDir() {
		return getResourcesDir() + File.separator + "actions";
	}
}
